#include <stdio.h>
int main() {
	int n = 10;
	int yanghui[10][10] = { 0 };
	for (int i = 0; i < n; i++) {
		yanghui[i][0] = 1;
		yanghui[i][i] = 1;
		for (int j = 1; j < i; j++) {
			yanghui[i][j] = yanghui[i - 1]
				[j - 1] + yanghui[i - 1][j];
		}
	}
	for (int i = 0; i < n; i++) {
		for (int k = 0; k < n - i - 1; k++)
		{
			printf("  ");
		}
		for (int j = 0; j <= i; j++) {
			printf("%4d", yanghui[i][j]);
		}
		printf("\n");
	}
	return 0;
}
	
